package camel.corp.universalcopy;

import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.view.MenuItem;
import android.widget.LinearLayout;
import android.widget.Toast;
import androidx.appcompat.app.a;
import androidx.appcompat.app.m;
import com.android.vending.billing.IInAppBillingService;
import com.camel.corp.universalcopy.DonateActivity;
import com.camel.corp.universalcopy.K;
import com.camel.corp.universalcopy.M;
import com.camel.corp.universalcopy.ma;
import com.crashlytics.android.Crashlytics;
import org.json.JSONException;
import org.json.JSONObject;

public class DonateActivity extends m {
  private IInAppBillingService r;
  
  private ServiceConnection s;
  
  private LinearLayout t;
  
  private void o() { (new M(this)).execute(new String[0]); }
  
  protected void onActivityResult(int paramInt1, int paramInt2, Intent paramIntent) {
    if (paramInt1 == 1001) {
      paramInt1 = paramIntent.getIntExtra("RESPONSE_CODE", 0);
      str = paramIntent.getStringExtra("INAPP_PURCHASE_DATA");
      if (paramInt2 == -1 && paramInt1 == 0)
        try {
          str = (new JSONObject(str)).getString("productId");
          ma.a(getApplication(), "DONATE", "DONATE_TIP", str);
          Toast.makeText(this, 2131755084, 1).show();
          finish();
          return;
        } catch (JSONException str) {
          Crashlytics.a(str);
        }  
    } 
  }
  
  protected void onCreate(Bundle paramBundle) {
    super.onCreate(paramBundle);
    setContentView(2131492910);
    a a = l();
    if (a != null) {
      a.c(2131755085);
      a.d(true);
    } 
    this.t = (LinearLayout)findViewById(2131296403);
    this.s = new K(this);
    Intent intent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
    intent.setPackage("com.android.vending");
    bindService(intent, this.s, 1);
  }
  
  public void onDestroy() {
    super.onDestroy();
    if (this.r != null)
      unbindService(this.s); 
  }
  
  public boolean onOptionsItemSelected(MenuItem paramMenuItem) {
    if (paramMenuItem.getItemId() != 16908332)
      return super.onOptionsItemSelected(paramMenuItem); 
    finish();
    return true;
  }
}


/* Location:              D:\Users\alienware\AndroidStudioProjects\Lazero\sample\sampler\classes-dex2jar\com\camel.jar!\camel\cor\\universalcopy\DonateActivity.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.0.7
 */